package com.yxinsur.imc.business.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yxinsur.imc.common.annotation.Excel;
import com.yxinsur.imc.common.core.domain.BaseImcEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 营销区-团队对象 imc_team
 *
 * @author imc
 * @date 2021-03-23
 */
public class ImcTeam extends BaseImcEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 上级团队 */
    @Excel(name = "上级团队")
    private Long parentId;

    /** 祖级列表 */
    @Excel(name = "祖级列表")
    private String ancestors;

    /** 团队（营销区）全名 */
    @Excel(name = "团队")
    private String teamName;

    /** 所属机构id (机构表sys_org的org_id） */
    @Excel(name = "所属机构id (机构表sys_org的org_id）")
    private Long orgId;

    /** 团队负责人id（imc_broker的主键） */
    @Excel(name = "团队负责人id", readConverterExp = "i=mc_broker的主键")
    private Long teamLeaderId;

    private Long rootTeamId;

    /** 开业时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开业时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date openDate;

    /** 租户id,一个租户id唯一对一个机构id（默认机构id为根节点id暨法人机构） */
    @Excel(name = "租户id,一个租户id唯一对一个机构id", readConverterExp = "默=认机构id为根节点id暨法人机构")
    private Long tenantId;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setParentId(Long parentId)
    {
        this.parentId = parentId;
    }

    public Long getParentId()
    {
        return parentId;
    }
    public void setAncestors(String ancestors)
    {
        this.ancestors = ancestors;
    }

    public String getAncestors()
    {
        return ancestors;
    }
    public void setTeamName(String teamName)
    {
        this.teamName = teamName;
    }

    public String getTeamName()
    {
        return teamName;
    }
    public void setOrgId(Long orgId)
    {
        this.orgId = orgId;
    }

    public Long getOrgId()
    {
        return orgId;
    }
    public void setTeamLeaderId(Long teamLeaderId)
    {
        this.teamLeaderId = teamLeaderId;
    }

    public Long getTeamLeaderId()
    {
        return teamLeaderId;
    }

    public Long getRootTeamId() {
        return rootTeamId;
    }

    public void setRootTeamId(Long rootTeamId) {
        this.rootTeamId = rootTeamId;
    }

    public void setOpenDate(Date openDate)
    {
        this.openDate = openDate;
    }

    public Date getOpenDate()
    {
        return openDate;
    }

    public void setTenantId(Long tenantId)
    {
        this.tenantId = tenantId;
    }

    public Long getTenantId()
    {
        return tenantId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("parentId", getParentId())
            .append("ancestors", getAncestors())
            .append("teamName", getTeamName())
            .append("orgId", getOrgId())
            .append("teamLeaderId", getTeamLeaderId())
            .append("openDate", getOpenDate())
            .append("createId", getCreateId())
            .append("createTime", getCreateTime())
            .append("updateId", getUpdateId())
            .append("updateTime", getUpdateTime())
            .append("isDeleted", getIsDeleted())
            .append("tenantId", getTenantId())
            .toString();
    }
}
